import request from '../utils/request';

/**
 * 新增项目团队
 * @param {*} data
 */
const create = data => request({
  url: '/v1/project/team',
  method: 'post',
  data
});

/**
 * 批量删除项目团队
 * @param {*} data
 */
const deleteBatch = ids => request({
  url: '/v1/project/team',
  method: 'delete',
  params: { ids }
});

/**
 * 通过项目Id查询项目团队分页信息
 * @param {*} params
 */
const getPage = params => request({
  url: `/v1/project/team/${params.id}/page`,
  method: 'get',
  params
});

// 新增团队成员
const addTeamUser = data => request({
  url: '/v1/project/team',
  method: 'post',
  data
});
// 删除团队成员
const deleteTeamUser = params => request({
  url: '/v1/project/team',
  method: 'delete',
  params
});

export default {
  create,
  deleteBatch,
  getPage,
  addTeamUser,
  deleteTeamUser
}


